home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: miker3@ix.netcom.com (Mike Rubenstein)
- Newsgroups: comp.lang.c
- Subject: Re: fflush and Visual C++
- Date: Sun, 17 Mar 1996 16:18:40 GMT
- Organization: Netcom
- Message-ID: <314c3a5f.145588955@nntp.ix.netcom.com>
- References: <4idhv5$dnv@news.mhv.net> <314b173b.71056173@nntp.ix.netcom.com> <4ifuuf$fha@solutions.solon.com>
- NNTP-Posting-Host: ix-dc12-26.ix.netcom.com
- X-NETCOM-Date: Sun Mar 17 8:18:40 AM PST 1996
- X-Newsreader: Forte Agent .99d/32.182
-
- seebs@solutions.solon.com (Peter Seebach) wrote:
-
- > In article <314b173b.71056173@nntp.ix.netcom.com>,
- > Mike Rubenstein <miker3@ix.netcom.com> wrote:
- > >Perhaps because Visual C implements fflush() correctly. fflush() does
- > >not flush input buffers. fflush() with stdin as an argument results
- > >in undefined behavior.
- >
- > The first part of this is incorrect. fflush() may flush input buffers.
- > It may cause the program to abort. It may do nothing. But there's
- > nothing *wrong* with it choosing to discard pending input when invoked
- > on an input stream. Except that it's rude of an implementation to offer
- > a silent extension, it causes people to make mistakes.
-
- What's incorrect? Are you claiming that Visual C does not implement
- fflush() correctly?
-
- And claiming that someone is wrong for saying that a function doesn't
- do something when the language definition does not define it as doing
- it is rather pedantic. Sure, it is true (as I point out) that
- fflush(stdin) can do anything, but I'd not suggest using it when you
- want to format your hard disk -- there are quite a few implementations
- that will not do that. :-)
-
-
- Michael M Rubenstein
-